-- GENERATED SPELL FOR [Gnomeregan Evacuee] --


function spell0_7843(pUnit, Event) --@Battle Stance,Self--
pUnit:FullCastSpellOnTarget(7165,pUnit)
pUnit:RegisterEvent('Sorts_7843', 576, 1)
end

function spell1_7843(pUnit, Event) --@Hamstring,n/a--
pUnit:FullCastSpellOnTarget(9080,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_7843', 10259, 1)
end

function spell2_7843(pUnit, Event) --@Heal,Heal--
pUnit:FullCastSpellOnTarget(2055,pUnit)
pUnit:RegisterEvent('Sorts_7843', 3000, 1)
end

function spell3_7843(pUnit, Event) --@Heroic Strike,n/a--
pUnit:FullCastSpellOnTarget(25712,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_7843', 604, 1)
end

function spell4_7843(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(6660,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_7843', 571, 1)
end

function Sorts_7843(pUnit, Event)
local choix_sorts_7843 = math.random(0, 4)
if choix_sorts_7843 == 0 then
pUnit:RegisterEvent('spell0_7843', 1, 1)
end
if choix_sorts_7843 == 1 then
pUnit:RegisterEvent('spell1_7843', 1, 1)
end
if choix_sorts_7843 == 2 then
pUnit:RegisterEvent('spell2_7843', 1, 1)
end
if choix_sorts_7843 == 3 then
pUnit:RegisterEvent('spell3_7843', 1, 1)
end
if choix_sorts_7843 == 4 then
pUnit:RegisterEvent('spell4_7843', 1, 1)
end
end

function mob7843_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_7843', math.random(1500, 3000), 1)
end

function mob7843_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob7843_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob7843_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(7843, 1, 'mob7843_Action')
RegisterUnitEvent(7843, 2, 'mob7843_Leave')
RegisterUnitEvent(7843, 3, 'mob7843_Kill')
RegisterUnitEvent(7843, 4, 'mob7843_Die')
